from selenium_po_practice.Pages.base_page import BasePage

base_url = 'https://work.weixin.qq.com/wework_admin/frame#contacts'
class ContactPage(BasePage):
    def get_member_list(self):

        # 注意此处find_elements和find_element的用法区别
        # member_list = self.driver.find_element_by_css_selector('.member_colRight_memberTable_td:nth-child(2)')
        member_list = self.driver.find_elements_by_css_selector('.member_colRight_memberTable_td:nth-child(2)')
        name_list = [i.text for i in member_list]

        print('member list:---------------------', member_list)
        print('name_list===================', name_list)

        return name_list

    def goto_add_member(self):
        from member_adding_page import MemberAddingPage

        return MemberAddingPage(self.driver)

